package com.pudu.mydemo.utils;

/**
 * Created by lgq on 2016/8/15.
 */

public class MLog {

    /**
     * @param filename   文件名字
     * @param explainString  描述信息
     */
    public static void d(String filename , String explainString){

  /*      long currentTimeMillis = System.currentTimeMillis();

        Calendar calendar = Calendar.getInstance();

        calendar.setTimeInMillis(currentTimeMillis);

        Date date = new Date(currentTimeMillis);

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss:SSS");

        //20160830-序列号-APP-Log.txt
        SimpleDateFormat logfile = new SimpleDateFormat("yyyyMMdd");

        String needWriteFiel = logfile.format(date)+ "-" + App.getInstance().getRobotSerialID() + "-" + filename ;

        String needWriteMessage = simpleDateFormat.format(date)  + "\t" + currentTimeMillis + "\t" + explainString;

        if (LogFileThread.getmHandler() != null) {
            Message msg = LogFileThread.getmHandler().obtainMessage();
            Bundle bundle = new Bundle();
            bundle.putString("tagString", needWriteFiel);
            bundle.putString("explainString", needWriteMessage);
            msg.setData(bundle);
            msg.sendToTarget();
        }*/

    }
}
